Repository navigation
feat: mark background session completions as unread - #89
Merged
Merged
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Open sessions now marks unread activity when a turn finishes or Pi exits while its transcript is out of view. Opening that session clears its marker across root, view and tab switches; duplicate end and exit events stay acknowledged.
Part of #1. Closes #88.
Verified with the repository's pinned Node 22 toolchain.
bun install --frozen-lockfilepassed.bun run lintpassed.bun run typecheckpassed.bun run test:unitpassed, 114 tests.mise exec -- bun run test:integrationpassed, 121 tests.mise run buildpassed, including lint, typecheck, unit/component tests and bundling.git diff --checkpassed.mise run test:e2epassed all 74 Electron tests.The seven new component cases cover shared-root tab acknowledgement, cross-root completion, same-root background completion and exit, visible completion and exit, and duplicate or unknown exit events. The two new Electron cases verify native desktop and minimum window sizes, keyboard acknowledgement without another prompt, and a background runtime exit.
Download the uploaded screenshot proof. The artefact contains these PNGs under
Users/runner/work/pidex/pidex/test-results/session-activity/, captured from real Electron windows with a temporary Git workspace and deterministic Pi RPC fixture. The test also writes the captures to.tmp/proof/; captures are not committed.background-completion.pngshows the unread API result while the web root is selected.background-completion-minimum.pngshows the marker at the native minimum window size.acknowledged-completion.pngandacknowledged-completion-minimum.pngshow the opened session after acknowledgement.background-exit.pngshows unread activity after the fixture runtime exits while Changes is open.Local
bun run test:e2e tests/e2e/session-activity.test.tswas blocked before app launch byElectron failed to install correctly. Hosted Electron capture and artefact upload succeeded. Inline screenshot attachment was blocked because the browser access host is unavailable, so the PNGs are linked through the uploaded CI artefact above.Unread state is held in memory for this window and resets on quit. A transcript already selected in this window is considered read, regardless of OS window focus. Notifications and persisted unread state remain follow-up work.